C--: A Portable Assembly Language that Supports Garbage Collection

نویسندگان

  • Simon L. Peyton Jones
  • Norman Ramsey
  • Fermin Reig
چکیده

For a compiler writer, generating good machine code for a variety of platforms is hard work. One might try to reuse a retargetable code generator, but code generators are complex and difficult to use, and they limit one’s choice of implementation language. One might try to use C as a portable assembly language, but C limits the compiler writer’s flexibility and the performance of the resulting code. The wide use of C, despite these drawbacks, argues for a portable assembly language. C-is a new language designed expressly for this purpose. The use of a portable assembly language introduces new problems in the support of such high-level run-time services as garbage collection, exception handling, concurrency, profiling, and debugging. We address these problems by combining the C-language with a C-run-time interface. The combination is designed to allow the compiler writer a choice of source-language semantics and implementation techniques, while still providing good performance.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

No Assembly Required : Compiling Standard ML

C has been used as a portable target language for implementing languages like Standard ML and Scheme. Previous eeorts at compiling these languages to C have produced eecient code, but also compromised on portability and proper tail-recursion. We show how to compile Standard ML to C without making such compromises. The compilation technique is based on converting Standard ML to a continuation-pa...

متن کامل

FCG: A Code Generator for Lazy Functional Languages

The FCG code generator produces portable code that supports efficient two-space copying garbage collection. The code generator transforms the output of the FAST compiler front end into an abstract machine code. This code explicitly uses a call stack, which is accessible to the garbage collector. In contrast to other functional language compilers that generate assembly directly, FCG uses the C c...

متن کامل

Writing practical memory management code with a strictly typed assembly language (Extended Version)

Memory management (e.g., malloc/free) cannot be implemented in traditional strictly typed programming languages because they do not allow programmers to reuse memory regions, in order to preserve memory safety. Therefore, they depend on external memory management facilities, such as garbage collection. Thus, many important programs that require explicit memory management (e.g., operating system...

متن کامل

A Methodology for Constructing Portable and Simple Global Garbage Collectors

Many garbage collectors on parallel computers are written in sequential languages, therefore thay are not portable across machines with different communication primitives. Moreover, the description of garbage collectors on distributed memory machines, which use asynchronous messages, is complex. We implemented a garbage collector for parallel object-oriented language Schematic by using Schemati...

متن کامل

An Optimizing Ml to C Compiler

Since the C language is a machine independent low-level language, it is well-suited as a portable target language for the implementation of higher-order programming languages. This paper presents an eecient C code generator for Caml-Light, a variant of CAML designed at INRIA. Fundamentally, the compilation technique consists of translating ML code via an intermediate language named Sqil and the...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999